<template>
  <div>
    <el-container class="layout" v-if="$route.path !== '/login'">
      <!--菜单栏-->
      <el-header class="header">
        <GlobalHeader />
      </el-header>
      <!--内容区-->
      <el-main>
        <router-view />
      </el-main>
      <!--页脚-->
      <el-footer class="footer">
        <GlobalFooter />
      </el-footer>
    </el-container>
    <template v-else>
      <router-view />
    </template>
  </div>
</template>
<script>
import GlobalFooter from '@/components/GlobalFooter.vue'
import GlobalHeader from '@/components/GlobalHeader.vue'

export default {
  name: 'LayoutPage',
  components: {
    GlobalFooter,
    GlobalHeader
  }
}
</script>

<style scoped lang="scss">
.layout {
  position: relative;
  height: 100vh;

  .header {
    background-color: #545c64;
  }
}
</style>
